<template>
    <form class="custom-form">
        <slot></slot>
    </form>
</template>

<script>
export default {
    name:"custom-form",
    props:{
        //控制表单大小
        size:{
            type:String,
            default:'default',
            //规则
            validator(value){
                return ['default','large', 'small', 'mini'].includes(value);
            }
        },
        //控制表单禁用状态
        disabled:{
            type:Boolean,
            default:false
        },
    },
    //通过 provide 将当前表单传递到所有后代组件中
    provide(){
        return{
            customForm: this
        }
    }
    
    
}
</script>

<style lang="sass" scoped>

</style>
